package com.dongxing.concyrrency.chapter2;

/**
 * @author XavierDong
 **/
public class BankVersion2 {


    public static void main(String[] args) {

        // 线程控制和业务逻辑分开，更像面向对象的思想
        final TicketWindowRunnable ticketWindowRunnable = new TicketWindowRunnable();
        final Thread thread1 = new Thread(ticketWindowRunnable,"一号窗口");
        final Thread thread2 = new Thread(ticketWindowRunnable,"二号窗口");
        final Thread thread3 = new Thread(ticketWindowRunnable,"三号窗口");

        thread1.start();
        thread2.start();
        thread3.start();
    }
}
